import Vue from 'vue'
import {
  Button, NavBar, Form, Icon, ActionSheet,
  Field, Notify, Tabbar, TabbarItem, Popup,
  Tab, Tabs, Cell, List, PullRefresh, Row, Col,
  Badge, Toast, Search, Dialog, Divider,
  Tag, CellGroup, Image, DatetimePicker,
  Lazyload
} from 'vant'

const components = [
  Button, NavBar, Form, Icon, ActionSheet,
  Field, Notify, Tabbar, TabbarItem, Popup,
  Tab, Tabs, Cell, List, PullRefresh, Row, Col,
  Badge, Toast, Search, Dialog, Divider,
  Tag, CellGroup, Image, DatetimePicker,
  Lazyload
]
// 统一注册
components.forEach(Cmp => Vue.use(Cmp))

// 组件对象只有实现了install方法，才可以通过Vue.use()方式注册
// Vue.use(Button)
// Vue.component(Button.name, Button)
// Vue.use(Tag)
// Vue.use(Lazyload)// 注册一个全局v-lazy指令，用于实现图片懒加载效果
// Vue.use(DatetimePicker)
// Vue.use(Image)
// Vue.use(CellGroup)
// Vue.use(Divider)
// Vue.use(Dialog)
// Vue.use(Search)
// Vue.use(Toast)
// Vue.use(Row)
// Vue.use(Col)
// Vue.use(Badge)
// Vue.use(Form)
// Vue.use(Field)
// Vue.use(NavBar)
// Vue.use(Notify)// 会在Vue.prototype上添加上$notify()
// Vue.use(Tabbar)
// Vue.use(TabbarItem)
// Vue.use(Icon)
// Vue.use(Tab)
// Vue.use(Tabs)
// Vue.use(Cell)
// Vue.use(PullRefresh)
// Vue.use(ActionSheet)
// Vue.use(Popup)
// Vue.use(List)
